package per.dj.testpro.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import per.dj.testpro.entity.protocol.Message;
import per.dj.testpro.service.AckService;
import per.dj.testpro.service.DataService;
import per.dj.testpro.service.MessageService;

@Service
public class MessageServiceImpl implements MessageService {

    private final static Logger LOGGER = LoggerFactory.getLogger(MessageServiceImpl.class);

    @Autowired
    private AckService ackService;

    @Autowired
    private DataService dataService;

    @Override
    public void processMsg(Message msg) {

        ackService.beginAck(msg);

        dataService.processData(msg);

    }
}
